package jgl.vajra.management.part.order.viewModel;

import java.util.Map;

import jgl.vajra.management.bean.OpenCityBean;
import jgl.vajra.management.part.order.contract.CustomerReceivingAreaContract;
import jgl.vajra.management.part.order.contract.ReceivingAreaContract;
import jgl.vajra.management.part.order.model.CustomerReceivingAreaModel;
import jgl.vajra.management.widget.mvvm.factory.CreateModel;
import jgl.vajra.management.widget.retrofithelper.rxsubscriber.ProgressObserver;

@CreateModel(CustomerReceivingAreaModel.class)
public class CustomerReceivingAreaViewModel extends CustomerReceivingAreaContract.ViewModel{
    @Override
    public void getOpenCityData(Map<String, Object> map) {
        mModel.getOpenCityData(map).subscribe(new ProgressObserver<OpenCityBean>(false,this) {
            @Override
            public void _onNext(OpenCityBean openCityBean) {
                mView.returnOpenCityData(openCityBean);
            }
        });
    }
}
